var shopAppController = angular.module('shopAppController', []);

shopAppController.controller('shopDetailController', ['$scope', '$routeParams','$http', function($scope, $routeParams, $http){
	$http.get('/product/ngData/'+$routeParams.id).success(function(data){
		console.log(data);
		jQuery.fancybox('#product-pop-up');
		if(data == null){
			console.log('called');
			return false;
		}
		$scope.name = data.name;
		$scope.content = data.content;
		$scope.qty = data.qty;
		$scope.status = data.status;
		$scope.price = data.price;
		$scope.img = data.img;
	});
}]);